package com.zy.composeworld

import android.content.Intent
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import com.zy.composeworld.base.BaseMenuActivity
import com.zy.composeworld.base.bean.BaseMenuBean
import com.zy.composeworld.base.ext.startFragmentWithMainContainer
import com.zy.composeworld.demo.reply.ReplyMainActivity
import com.zy.composeworld.fragment.demo.Demo1Fragment
import java.util.ArrayList

class MainListActivity : BaseMenuActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()

        //startActivity(Intent(this@MainListActivity, Demo1Activity::class.java))
        startFragmentWithMainContainer(Demo1Fragment::class.java)
    }


    override fun ArrayList<BaseMenuBean>.initList() {
        add(BaseMenuBean("Compose"))
        add(BaseMenuBean("Compose UI") {
            startActivity(Intent(this@MainListActivity, MainActivity::class.java))
        })

        add(BaseMenuBean("Compose Demo"))
        add(BaseMenuBean("Demo1") {
            //startActivity(Intent(this@MainListActivity, Demo1Activity::class.java))
            startFragmentWithMainContainer(Demo1Fragment::class.java)
        })
        add(BaseMenuBean("Reply") {
            startActivity(Intent(this@MainListActivity, ReplyMainActivity::class.java))
        })
    }

}